package action.report;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.Region;

import model.app.AppFinance;
import model.app.AppInfo;

import service.report.ReportMoneyService;
import util.Time;
import util.Tool;
import core.action.BaseAction;
import exception.Exceptions;

@SuppressWarnings("deprecation")
public class ReportMoneyAction extends BaseAction{
	
	private Map<String, BigDecimal> countMap = new HashMap<String, BigDecimal>();
	private ReportMoneyService reportMoneyService;
	private AppFinance appFinance;
	private AppInfo appInfoName;
	private AppInfo appInfoAddress;
	
	private BigDecimal xiaoji;//小计
	
	private BigDecimal suoyouzhequanyi;//小计
	
	private Double allEmployee;//小计
	
	private BigDecimal allIncome;//当年累计利润
	
	private String dateYear;
	private String dateMonth;
	
	private String searchDate;
	
	private String fileName;
	
	public String execute() throws Exceptions{
		String dateTime = Time.Timestamp2TimeString(Time.CurrentTimestamp());
		this.calc(dateTime);
		return "success";
	}
	
	/**
	 * 按照时间查询
	 * */
	public String search() throws Exceptions{
		String dateTime = "";
		if(this.searchDate.equals("") || this.searchDate == null){
			dateTime = Time.Timestamp2TimeString(Time.CurrentTimestamp());
		}else{
			dateTime = searchDate;
		}
		this.calc(dateTime);
		return "success";
	}
	
	public void calc(String dateTime) throws Exceptions{
		dateYear = dateTime.substring(0, 4);
		dateMonth = dateTime.substring(5, 7);
		countMap = reportMoneyService.getListReportMoney(dateTime);
		appFinance = reportMoneyService.getFinance(dateTime);
		allIncome = reportMoneyService.getAllIncome(dateTime);
		
		if(appFinance == null){
			countMap.put("xiaoji", new BigDecimal(0.00));
			countMap.put("suoyouzhequanyi", new BigDecimal(0.00));
		}else{
			if(appFinance.getOperatorgfinance() != null && appFinance.getOperatregfinance() != null){
				countMap.put("xiaoji", new BigDecimal(appFinance.getOperatorgfinance()).add(new BigDecimal(appFinance.getOperatregfinance())).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
			}else{
				countMap.put("xiaoji", new BigDecimal(0.00));
			}
			try{
				countMap.put("allEmployee", (new BigDecimal(appFinance.getWorkmanager()).add(new BigDecimal(appFinance.getWorkemployee()))).divide(new BigDecimal(10000)));
			}catch(Exception e){
				countMap.put("allEmployee", new BigDecimal(0.00));
			}
			countMap.put("suoyouzhequanyi", new BigDecimal(appFinance.getAsset()).subtract(new BigDecimal(appFinance.getDebt())).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		}
		appInfoName = this.reportMoneyService.getInfor("companyname");
		appInfoAddress = this.reportMoneyService.getInfor("area");
		countMap.put("tax", new BigDecimal(appFinance.getTax()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		countMap.put("fiveyearsbad", new BigDecimal(appFinance.getFiveyearsbad()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		countMap.put("operatregfinance", new BigDecimal(appFinance.getOperatregfinance()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		countMap.put("operatorgfinance", new BigDecimal(appFinance.getOperatorgfinance()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		countMap.put("asset", new BigDecimal(appFinance.getAsset()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
		countMap.put("debt", new BigDecimal(appFinance.getDebt()).divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP));
	}
	
	/**
	 * 导出报表,自动调用getInputStream()
	 * */
	public String reportExport(){
		return "report";
	}
	
	public InputStream getInputStream() throws Exceptions {
		String dateTime = "";
        if(this.searchDate.equals("") || this.searchDate == null){
        	dateTime = Time.Timestamp2TimeString(Time.CurrentTimestamp());
        }else{
        	dateTime = searchDate;
        }
        
        this.calc(dateTime);
        
        HSSFWorkbook workbook = new HSSFWorkbook();
        HSSFCellStyle style = workbook.createCellStyle();
		style.setAlignment(HSSFCellStyle.ALIGN_CENTER);// 左右居中  
		style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中 
		
        HSSFSheet sheet = createSheet(workbook, style);
        addMapRow(sheet, 1, style);

		//下载文件名
        fileName=Tool.toChinese(dateYear + "年度" + dateMonth + "月份小额贷款公司运营情况月度比较表.xls");
        
        //输出下载
		ByteArrayOutputStream baos = new ByteArrayOutputStream();  
		try {
			workbook.write(baos);
		} catch (IOException e) {
			e.printStackTrace();
		}
        byte[] ba = baos.toByteArray();
        ByteArrayInputStream bais = new ByteArrayInputStream(ba);
        return bais;
	}
	
	public int addMapRow(HSSFSheet sheet, int rowNumber, HSSFCellStyle style){
		
		HSSFRow row = sheet.createRow(6);
		
        row.createCell((short)0).setCellValue(this.appInfoName.getValue());
        row.createCell((short)1).setCellValue(this.appInfoAddress.getValue());
        row.createCell((short)2).setCellValue(countMap.get("xiaoji").toString());
        row.createCell((short)3).setCellValue(countMap.get("operatregfinance").toString());
        row.createCell((short)4).setCellValue(countMap.get("operatorgfinance").toString());
        row.createCell((short)5).setCellValue(countMap.get("asset").toString());
        row.createCell((short)6).setCellValue(countMap.get("debt").toString());
        row.createCell((short)7).setCellValue(countMap.get("suoyouzhequanyi").toString());
        row.createCell((short)8).setCellValue(countMap.get("thisMonAvgRate").toString());
        row.createCell((short)9).setCellValue(countMap.get("allAvgRate").toString());
        row.createCell((short)10).setCellValue(countMap.get("rateIncomeYear").toString());
        row.createCell((short)11).setCellValue(countMap.get("loanOfThisMonth").toString());
        row.createCell((short)12).setCellValue(countMap.get("rateIncomeMonth").toString());
        row.createCell((short)13).setCellValue(countMap.get("countOfThisYear").toString());
        row.createCell((short)14).setCellValue(countMap.get("loanOfThisYear").toString());
        row.createCell((short)15).setCellValue(countMap.get("loanOfThisYearAvg").toString());
        row.createCell((short)16).setCellValue(countMap.get("countOfThisMonth").toString());
        row.createCell((short)17).setCellValue(countMap.get("balanceOfThisMonth").toString());
        row.createCell((short)18).setCellValue(countMap.get("balanceByDateLine06").toString());
        row.createCell((short)19).setCellValue(countMap.get("balanceByDateLine712").toString());
        row.createCell((short)20).setCellValue(countMap.get("balanceByDateLine12").toString());
        row.createCell((short)21).setCellValue(countMap.get("balanceByObjectN").toString());
        row.createCell((short)22).setCellValue(countMap.get("balanceByObjectE").toString());
        row.createCell((short)23).setCellValue(countMap.get("balanceByObjectO").toString());
        row.createCell((short)24).setCellValue(countMap.get("balanceByMoney5").toString());
        row.createCell((short)25).setCellValue(countMap.get("balanceByMoneyRate5").toString());
        row.createCell((short)26).setCellValue(countMap.get("balanceByMoney10").toString());
        row.createCell((short)27).setCellValue(countMap.get("balanceByMoneyRate10").toString());
        row.createCell((short)28).setCellValue(countMap.get("balanceByMoney11").toString());
        row.createCell((short)29).setCellValue(countMap.get("balanceByMoneyRate11").toString());
        row.createCell((short)30).setCellValue(countMap.get("fiveyearsbad").toString());
        row.createCell((short)31).setCellValue(countMap.get("rateIncomeYear").toString());
        row.createCell((short)32).setCellValue(0.00);
        row.createCell((short)33).setCellValue(countMap.get("tax").toString());
        row.createCell((short)34).setCellValue(allIncome.toString());
        row.createCell((short)35).setCellValue(countMap.get("allEmployee").toString());
		return rowNumber;
	}
	
	public HSSFSheet createSheet(HSSFWorkbook workbook, HSSFCellStyle style){
		HSSFSheet sheet = workbook.createSheet(dateYear + "年度" + dateMonth + "月份小额贷款公司运营情况月度比较表");
		
		HSSFCellStyle styleL = workbook.createCellStyle();
		styleL.setAlignment(HSSFCellStyle.ALIGN_LEFT);// 左右居中  
		styleL.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中 
		
        //合并单元格
		sheet.addMergedRegion(new Region(0, (short)0, 0, (short)35));
		sheet.addMergedRegion(new Region(1, (short)0, 1, (short)15));
		sheet.addMergedRegion(new Region(1, (short)16, 1, (short)30));
		sheet.addMergedRegion(new Region(1, (short)31, 1, (short)35));
		
        sheet.addMergedRegion(new Region(2, (short)0, 5, (short)0));
        sheet.addMergedRegion(new Region(2, (short)1, 5, (short)1));
        sheet.addMergedRegion(new Region(2, (short)2, 2, (short)4));
        sheet.addMergedRegion(new Region(2, (short)5, 2, (short)7));
        sheet.addMergedRegion(new Region(2, (short)8, 2, (short)9));
        sheet.addMergedRegion(new Region(2, (short)10, 2, (short)10));
        sheet.addMergedRegion(new Region(2, (short)11, 2, (short)15));
        sheet.addMergedRegion(new Region(2, (short)16, 2, (short)29));
        sheet.addMergedRegion(new Region(2, (short)30, 2, (short)30));
        sheet.addMergedRegion(new Region(2, (short)31, 2, (short)32));
        sheet.addMergedRegion(new Region(2, (short)33, 2, (short)33));
        sheet.addMergedRegion(new Region(2, (short)34, 2, (short)34));
        sheet.addMergedRegion(new Region(2, (short)35, 2, (short)35));
		
        sheet.addMergedRegion(new Region(3, (short)2, 5, (short)2));
        sheet.addMergedRegion(new Region(3, (short)3, 5, (short)3));
        sheet.addMergedRegion(new Region(3, (short)4, 5, (short)4));
        sheet.addMergedRegion(new Region(3, (short)5, 5, (short)5));
        sheet.addMergedRegion(new Region(3, (short)6, 5, (short)6));
        sheet.addMergedRegion(new Region(3, (short)7, 5, (short)7));
        sheet.addMergedRegion(new Region(3, (short)8, 5, (short)8));
        sheet.addMergedRegion(new Region(3, (short)9, 5, (short)9));
        sheet.addMergedRegion(new Region(3, (short)10, 5, (short)10));
        sheet.addMergedRegion(new Region(3, (short)11, 5, (short)11));
        sheet.addMergedRegion(new Region(3, (short)12, 5, (short)12));
        sheet.addMergedRegion(new Region(3, (short)13, 3, (short)15));
		 sheet.addMergedRegion(new Region(3, (short)16, 5, (short)16));
        sheet.addMergedRegion(new Region(3, (short)17, 5, (short)17));
        sheet.addMergedRegion(new Region(3, (short)18, 3, (short)20));
        sheet.addMergedRegion(new Region(3, (short)21, 3, (short)23));
        sheet.addMergedRegion(new Region(3, (short)24, 3, (short)29));
        sheet.addMergedRegion(new Region(3, (short)30, 5, (short)30));
		sheet.addMergedRegion(new Region(3, (short)31, 5, (short)31));
		sheet.addMergedRegion(new Region(3, (short)32, 5, (short)32));
        sheet.addMergedRegion(new Region(3, (short)33, 5, (short)33));
        sheet.addMergedRegion(new Region(3, (short)34, 5, (short)34));
        sheet.addMergedRegion(new Region(3, (short)35, 5, (short)35));
		
		sheet.addMergedRegion(new Region(4, (short)13, 5, (short)13));
		 sheet.addMergedRegion(new Region(4, (short)14, 5, (short)14));
        sheet.addMergedRegion(new Region(4, (short)15, 5, (short)15));
        sheet.addMergedRegion(new Region(4, (short)18, 5, (short)18));
        sheet.addMergedRegion(new Region(4, (short)19, 5, (short)19));
        sheet.addMergedRegion(new Region(4, (short)20, 5, (short)20));
        sheet.addMergedRegion(new Region(4, (short)21, 5, (short)21));
		sheet.addMergedRegion(new Region(4, (short)22, 5, (short)22));
		sheet.addMergedRegion(new Region(4, (short)23, 5, (short)23));
        sheet.addMergedRegion(new Region(4, (short)24, 4, (short)25));
        sheet.addMergedRegion(new Region(4, (short)26, 4, (short)27));
        sheet.addMergedRegion(new Region(4, (short)28, 4, (short)29));
		
		sheet.addMergedRegion(new Region(5, (short)24, 5, (short)24));
		sheet.addMergedRegion(new Region(5, (short)25, 5, (short)25));
		sheet.addMergedRegion(new Region(5, (short)26, 5, (short)26));
        sheet.addMergedRegion(new Region(5, (short)27, 5, (short)27));
        sheet.addMergedRegion(new Region(5, (short)28, 5, (short)28));
        sheet.addMergedRegion(new Region(5, (short)25, 5, (short)29));
        
        HSSFRow header = sheet.createRow(0);
        HSSFCell cell = null;
        header = sheet.createRow(0);
        cell = header.createCell((short)0);
        cell.setCellValue(new HSSFRichTextString(dateYear + "年度" + dateMonth + "月份小额贷款公司运营情况月度比较表"));
        cell.setCellStyle(style);
        
        header = sheet.createRow(1);
        cell = header.createCell((short)0);
        cell.setCellValue(new HSSFRichTextString("监管部门名称"));
        cell.setCellStyle(styleL);
        
        cell = header.createCell((short)16);
        cell.setCellValue(new HSSFRichTextString("小额贷款公司名称"));
        cell.setCellStyle(styleL);
        
        cell = header.createCell((short)31);
        cell.setCellValue(new HSSFRichTextString("单位：万元"));
        cell.setCellStyle(styleL);
        
        header = sheet.createRow(2);
        cell = header.createCell((short)0);
        cell.setCellValue(new HSSFRichTextString("区市"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)1);
        cell.setCellValue(new HSSFRichTextString("小额贷款公司名称"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)2);
        cell.setCellValue(new HSSFRichTextString("营运资金"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)5);
        cell.setCellValue(new HSSFRichTextString("资产负债"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)8);
        cell.setCellValue(new HSSFRichTextString("贷款利率"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)10);
        cell.setCellValue(new HSSFRichTextString(""));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)11);
        cell.setCellValue(new HSSFRichTextString("贷款发生额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)16);
        cell.setCellValue(new HSSFRichTextString("期末贷款余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)30);
        cell.setCellValue(new HSSFRichTextString("五级不良贷款"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)31);
        cell.setCellValue(new HSSFRichTextString("营业外收入"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)33);
        cell.setCellValue(new HSSFRichTextString("税收"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)34);
        cell.setCellValue(new HSSFRichTextString("营业利润"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)35);
        cell.setCellValue(new HSSFRichTextString("吸收就业"));
        cell.setCellStyle(style);
        
        header = sheet.createRow(3);
        cell = header.createCell((short)2);
        cell.setCellValue(new HSSFRichTextString("小计"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)3);
        cell.setCellValue(new HSSFRichTextString("注册资本"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)4);
        cell.setCellValue(new HSSFRichTextString("金融机构融入资金"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)5);
        cell.setCellValue(new HSSFRichTextString("资产"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)6);
        cell.setCellValue(new HSSFRichTextString("负债"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)7);
        cell.setCellValue(new HSSFRichTextString("所有者权益"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)8);
        cell.setCellValue(new HSSFRichTextString("当月平均利率（%）"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)9);
        cell.setCellValue(new HSSFRichTextString("累计平均利率（%）"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)10);
        cell.setCellValue(new HSSFRichTextString("利息收入（年）"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)11);
        cell.setCellValue(new HSSFRichTextString("当月贷款额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)12);
        cell.setCellValue(new HSSFRichTextString("利息收入（月）"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)13);
        cell.setCellValue(new HSSFRichTextString("当年累计"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)16);
        cell.setCellValue(new HSSFRichTextString("期末贷款比数"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)17);
        cell.setCellValue(new HSSFRichTextString("期末贷款余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)18);
        cell.setCellValue(new HSSFRichTextString("按贷款期限划分"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)21);
        cell.setCellValue(new HSSFRichTextString("按贷款资金投向划分"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)24);
        cell.setCellValue(new HSSFRichTextString("按单户贷款余额划分"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)30);
        cell.setCellValue(new HSSFRichTextString("余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)31);
        cell.setCellValue(new HSSFRichTextString("当年贷款利息收入"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)32);
        cell.setCellValue(new HSSFRichTextString("当年累计手续费、佣金等其他收入"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)33);
        cell.setCellValue(new HSSFRichTextString("当年缴纳企业所得税、营业税及附加、印花税等合计"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)34);
        cell.setCellValue(new HSSFRichTextString("当年累计营业利润"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)35);
        cell.setCellValue(new HSSFRichTextString("员工合计"));
        cell.setCellStyle(style);
        
        header = sheet.createRow(4);
        cell = header.createCell((short)13);
        cell.setCellValue(new HSSFRichTextString("贷款比数"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)14);
        cell.setCellValue(new HSSFRichTextString("贷款额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)15);
        cell.setCellValue(new HSSFRichTextString("平均每笔贷款额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)18);
        cell.setCellValue(new HSSFRichTextString("0-6个月"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)19);
        cell.setCellValue(new HSSFRichTextString("7-12个月"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)20);
        cell.setCellValue(new HSSFRichTextString("12个月以上"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)21);
        cell.setCellValue(new HSSFRichTextString("涉农"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)22);
        cell.setCellValue(new HSSFRichTextString("小微企业"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)23);
        cell.setCellValue(new HSSFRichTextString("其他"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)24);
        cell.setCellValue(new HSSFRichTextString("不超过50万元（注册资本1亿元以上的为100万元）的贷款"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)26);
        cell.setCellValue(new HSSFRichTextString("50万元（注册资本1亿元以上的为100万元）以上不超过资本金的5%的贷款"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)28);
        cell.setCellValue(new HSSFRichTextString("超过资本金5%的贷款"));
        cell.setCellStyle(style);
        
        header = sheet.createRow(5);
        cell = header.createCell((short)24);
        cell.setCellValue(new HSSFRichTextString("期末余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)25);
        cell.setCellValue(new HSSFRichTextString("占总资产的比例"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)26);
        cell.setCellValue(new HSSFRichTextString("期末余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)27);
        cell.setCellValue(new HSSFRichTextString("占总资产的比例"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)28);
        cell.setCellValue(new HSSFRichTextString("期末余额"));
        cell.setCellStyle(style);
        
        cell = header.createCell((short)29);
        cell.setCellValue(new HSSFRichTextString("占总资产的比例"));
        cell.setCellStyle(style);
        
        return sheet;
	}
	
	

	public Map<String, BigDecimal> getCountMap() {
		return countMap;
	}

	public void setCountMap(Map<String, BigDecimal> countMap) {
		this.countMap = countMap;
	}

	public ReportMoneyService getReportMoneyService() {
		return reportMoneyService;
	}

	public void setReportMoneyService(ReportMoneyService reportMoneyService) {
		this.reportMoneyService = reportMoneyService;
	}

	public String getDateYear() {
		return dateYear;
	}

	public void setDateYear(String dateYear) {
		this.dateYear = dateYear;
	}

	public String getDateMonth() {
		return dateMonth;
	}

	public void setDateMonth(String dateMonth) {
		this.dateMonth = dateMonth;
	}

	public String getSearchDate() {
		return searchDate;
	}

	public void setSearchDate(String searchDate) {
		this.searchDate = searchDate;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public AppFinance getAppFinance() {
		return appFinance;
	}

	public void setAppFinance(AppFinance appFinance) {
		this.appFinance = appFinance;
	}

	public BigDecimal getXiaoji() {
		return xiaoji;
	}

	public void setXiaoji(BigDecimal xiaoji) {
		this.xiaoji = xiaoji;
	}

	public Double getAllEmployee() {
		return allEmployee;
	}

	public void setAllEmployee(Double allEmployee) {
		this.allEmployee = allEmployee;
	}

	public AppInfo getAppInfoName() {
		return appInfoName;
	}

	public void setAppInfoName(AppInfo appInfoName) {
		this.appInfoName = appInfoName;
	}

	public AppInfo getAppInfoAddress() {
		return appInfoAddress;
	}

	public BigDecimal getSuoyouzhequanyi() {
		return suoyouzhequanyi;
	}

	public void setSuoyouzhequanyi(BigDecimal suoyouzhequanyi) {
		this.suoyouzhequanyi = suoyouzhequanyi;
	}

	public void setAppInfoAddress(AppInfo appInfoAddress) {
		this.appInfoAddress = appInfoAddress;
	}

	public BigDecimal getAllIncome() {
		return allIncome;
	}

	public void setAllIncome(BigDecimal allIncome) {
		this.allIncome = allIncome;
	}

}
